package com.yhyvr.api.tool;

import com.yhyvr.api.handle.ApiJsonpView;
import com.yhyvr.pojo.resp.api.ApiRespData;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by zhangqin on 2017/4/6.
 */
public class ViewFactory {

    public static ModelAndView buildApiJsonpView(Object o,String crossDomain){
        ApiJsonpView apiJsonpView = new ApiJsonpView();
        apiJsonpView.setCrossDomain(crossDomain);
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setView(apiJsonpView);
        modelAndView.addObject(o);
        return  modelAndView;
    }
}
